package com.example.librarymanagementproject2.mapper;

import com.example.librarymanagementproject2.model.entity.BorrowRecord;

/**
 * @InterfaceName BorrowRecordMapper
 * @Description TODO
 * @Author Kx
 * @Date 2025/10/28 10:38
 * @Version 1.0
 */
public interface BorrowRecordMapper {
    /**
     * @author: kx
     * @date: 2025/10/28 10:38
     * @param borrowRecord : 借阅记录信息
     * @description: 添加借阅记录
    */
    Long insertBorrowRecord(BorrowRecord borrowRecord);

    /**
     * @author: kx
     * @date: 2025/10/28 14:42
     * @param borrowRecordId : 借阅记录ID
     * @return com.example.librarymanagementproject2.model.entity.BorrowRecord
     * @description: 根据ID查询借阅记录信息
    */
    BorrowRecord getBorrowRecordById(Long borrowRecordId);

    /**
     * @author: kx
     * @date: 2025/10/28 15:33
     * @param borrowRecord : 借阅记录信息
     * @description: 成功借阅时修改借阅记录状态信息
    */
    void updateBorrowRecordStatus(BorrowRecord borrowRecord);

    /**
     * @author: kx
     * @date: 2025/10/29 20:36
     * @param borrowRecord : 借阅记录信息
     * @description: 还书时修改借阅记录状态信息
    */
    void updateBorrowRecordStatusOnReturn(BorrowRecord borrowRecord);
}
